<template>
  <div class="elm-edit pfull" style="overflow: hidden;">
    <elm-page-tb>
      <template #top>
        <el-input v-model="postData.name" placeholder="请输入姓名关键字" prefix-icon='el-icon-search' size="mini" style="width: 250px; margin-left: 10px;" clearable></el-input>
        <right>
          <el-button-group>
            <el-button icon="el-icon-search" size="mini" @click="tablebinding()">查询</el-button>
          </el-button-group>
        </right>
      </template>
      <elm-table url="/business/analysis/cockpit/GetEIStateList" :post-data="postData" :show-index="true">
        <el-table-column prop="name" label="姓名" align="center" width="100px"></el-table-column>
        <el-table-column prop="sex" label="性别" v-if="postData.state === '在岗'" align="center"></el-table-column>
        <el-table-column prop="org_name" label="所属部门" align="center" width="200px"></el-table-column>
        <el-table-column prop="work_state" label="状态" align="center" ></el-table-column>
        <el-table-column prop="trip_area" label="出差地点" v-if="postData.state === '出差'" align="center"></el-table-column>
        <el-table-column prop="trip_days" label="出差天数" v-if="postData.state === '出差'" align="center"></el-table-column>
        <el-table-column prop="leave_type" label="请假类型" v-if="postData.state === '请假'" align="center"></el-table-column>
        <el-table-column label="时间" v-if="postData.state !== '在岗'" align="center" width="200px">
          <template v-slot="scope">
            <span>{{scope.row.start_date}} 至 {{scope.row.end_date}}</span>
          </template>
        </el-table-column>
      </elm-table>
    </elm-page-tb>
  </div>
</template>

<script>
export default {
  extends: elmVueBase,
  data() {
    return {
      postData: {
        name: null,
        state: elm.dialog.request.state,
      },
    }
  },
  created() {
  },
  mounted() {
  },
  methods: {
  
  }
}
</script>

<style>
</style>